package com.sjh.test.java8.lambda;

import java.util.Arrays;
import java.util.List;

public class LambdaTest2 {
    public static void main(String[] args)
    {
        LambdaTest2 tester = new LambdaTest2();
        tester.run();
    }

    public void run()
    {
        List<String> list = Arrays.asList("Action","Cebci","Back");

        // 输出
        list.forEach(item -> System.out.println(item));


        // 转换为大写
        list.forEach(item -> upperAndPrint(item));
    }

    public static void upperAndPrint(String s)
    {
        System.out.println(s.toUpperCase());
    }
}
